home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / ShareMailGiftware / AmigaTalk / testfiles / TestClipBoard1 < prev    next >
Text File  |  2002-10-27  |  937b  |  45 lines

  1. cb0 <- ClipBoard new: 0
  2.  
  3. cb0 postAsciiStringToClip:    'This is a test string!'
  4.  
  5. cb0 writeFTXTClipToASCIIFile: 'RAM:CheckCB0ascii'
  6.  
  7. cb0 postAsciiFileToClip:      'Amigatalk:TestFiles/TestClipBoard'
  8.  
  9. ctype <- (cb0 clipTypeIs)
  10.  
  11. (ctype asString), ' cb0 should be #FTXT' print
  12.  
  13. cb0 writeFTXTClipToFTXTFile:  'RAM:CheckCB0FTXT'
  14.  
  15. cb1 <- ClipBoard new: 1
  16.  
  17. cb1 postILBMFileToClip:  'AmigaTalk:C/AmigaTalk.iff'
  18.  
  19. ctype <- (cb1 clipTypeIs)
  20.  
  21. (ctype asString), ' cb1 should be #ILBM' print
  22.  
  23. cb1 writeILBMClipToFile: 'RAM:CheckCB1ILBM'
  24.  
  25. 'Done testing ClipBoard methods, now for IFFClipBoard...' print
  26.  
  27. tfile  <- File new
  28.  
  29. tfile open: 'RAM:CheckCB0FTXT'
  30.  
  31. ftxt   <- String new: (tfile size)
  32.  
  33. iffcb3 <- IFFClipBoard new
  34.  
  35. iffcb3 writeFTXTClip:  0 toFTXTString:   ftxt size: (tfile size)
  36.  
  37. iffcb3 postToClipUnit: 9 fromFTXTString: ftxt
  38.  
  39. cb9 <- ClipBoard new: 9
  40.  
  41. cb9 writeFTXTClipToASCIIFile: 'RAM:CheckCB9ascii'
  42.  
  43. 'Done testing IFFClipBoard methods!' print
  44.  
  45.